﻿using System;
using UnityEngine;

namespace UniRx.Triggers
{
	// Token: 0x02000429 RID: 1065
	[DisallowMultipleComponent]
	public class ObservableCanvasGroupChangedTrigger : ObservableTriggerBase
	{
		// Token: 0x06001638 RID: 5688 RVA: 0x000612B0 File Offset: 0x0005F6B0
		private void OnCanvasGroupChanged()
		{
			if (this.onCanvasGroupChanged != null)
			{
				this.onCanvasGroupChanged.OnNext(Unit.Default);
			}
		}

		// Token: 0x06001639 RID: 5689 RVA: 0x000612D0 File Offset: 0x0005F6D0
		public IObservable<Unit> OnCanvasGroupChangedAsObservable()
		{
			Subject<Unit> result;
			if ((result = this.onCanvasGroupChanged) == null)
			{
				result = (this.onCanvasGroupChanged = new Subject<Unit>());
			}
			return result;
		}

		// Token: 0x0600163A RID: 5690 RVA: 0x000612F8 File Offset: 0x0005F6F8
		protected override void RaiseOnCompletedOnDestroy()
		{
			if (this.onCanvasGroupChanged != null)
			{
				this.onCanvasGroupChanged.OnCompleted();
			}
		}

		// Token: 0x04000C8A RID: 3210
		private Subject<Unit> onCanvasGroupChanged;
	}
}
